package graficar;

import java.awt.BasicStroke;
import java.awt.Canvas;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.geom.Ellipse2D;
import java.awt.geom.Rectangle2D;
import java.util.ArrayList;

public class GraficoConmutadorCentral extends GraficoConmutadores {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	final double VARIACION_X=0.07;
	final double VARIACION_Y=0.04;
	ArrayList<GraficoTelefonoExterno> te = new ArrayList<GraficoTelefonoExterno>(); 
	
	
	
	public ArrayList<GraficoTelefonoExterno> getTe() {
		return te;
	}

	public void setTe(ArrayList<GraficoTelefonoExterno> te) {
		this.te = te;
	}

	public void setConCent(Diagrama lienzo , Ellipse2D eliPrincipal){
		
		int ancho = lienzo.getWidth();
	    int alto = lienzo.getHeight();
	    	    
	    x=((eliPrincipal.getMaxX()/2)-((.1*ancho)/2));
	    y=2*eliPrincipal.getMinY(); //posicion y
	    tamX=(VARIACION_X*ancho); //ancho
	    tamY=(VARIACION_Y*alto); //alto
	    			    
	    }
	
public void paint(Graphics g){
	
	Graphics2D g2d = (Graphics2D) g;
	Rectangle2D recAux = new Rectangle2D.Double(this.getX(),this.getY(),this.getTamX(),this.getTamY());
	
	g2d.setColor(Color.GREEN);
    g2d.fill(recAux);
	g2d.setStroke(new BasicStroke(5));
	g2d.setColor(Color.LIGHT_GRAY);
    g2d.draw(recAux);
	
    
	}

}
